﻿@using CodeCamp.Models.Home
@model ContactViewModel
@{
    @* ViewBag.RegistrationUrl set in code - SetSharedViewBagProperties *@
    ViewBag.EventName = "";
    ViewBag.Title = "";
    if ((@Model != null) && (@Model.EventDisplayName != null))
    {
        ViewBag.Title = ("Contact Code Camp about " + @Model.EventDisplayName);
        ViewBag.EventName = @Model.EventDisplayName;
    }
    else
    {
        ViewBag.Title = "Contact Code Camp";
        ViewBag.EventName = "Code Camp";
    }
}

@section headaddon {
<style>
    #Subject 
    {
        width: 30em;
    }
    #Name 
    {
        width: 30em;
    }
    #EmailAddress 
    {
        width: 30em;
    }
    .editor-label
    {
        margin-top: 10px;
        width: 30em;
    }
    fieldset label 
    {
        width: 30em;
    }
</style>
}

<h3 class="title">Contact the organizers of @Model.EventDisplayName</h3>

@if (!Model.ContactEnabled)
{
    <p>Contact is not enabled at this time.</p>
}
else
{
    if (Model.ContactDetail != null)
    {
        @Html.Partial("ContactDetailPartial", Model.ContactDetail)
    }
}

@section sidebar {
    <div id="subLinksContainer" class="widget rounded-10">
    <h3>About</h3>
    <ul>
        <li>@Html.ActionLink("About Code Camp", "About", "Home", new { eventName = Model.EventShortName }, null)</li>
        @if ((Model != null) && Model.ShowAboutDirections)
        {
            <li>@Html.ActionLink("Directions", "Directions", "Home", new { eventName = Model.EventShortName }, null)</li>
        }
        <li>@Html.ActionLink("Other Boston Code Camps", "OtherCCEvents", "Home", new { eventName = Model.EventShortName }, null)</li>
    </ul>
    </div>
@if (@Model.DefaultEventShortName != @Model.EventShortName)
{
<div class="widget rounded-10">
    <h3>This is:</h3>
    <h3>@Model.EventDisplayName</h3>
    <h3>Switch to:</h3>
    <h3>@Html.ActionLink(string.Concat("Contact us about ", Model.DefaultEventShortName), "Contact", "Home", new { eventName = @Model.DefaultEventShortName }, null)</h3>
</div>
}
}
